<template>
    <div>
        <div class="header-info">
            <p>测试</p>
        </div>
        <div class="card">
            <el-button @click="mqVisible=true">推送消息</el-button>
        </div>

        <el-dialog title="推送消息" class="centerDialog"
                   :visible.sync="mqVisible" :close-on-click-modal="true"
                   :showClose="true" :append-to-body="true">
            <div class="card">
                <kv label="车牌号">
                    <el-input v-model="info.vehicleId"/>
                </kv>
                <kv label="高速入口">
                    <el-input v-model="info.entryStation"/>
                </kv>
                <kv label="入口时间">
                    <el-input v-model="info.entryTime"/>
                </kv>
                <kv label="北斗设备Id">
                    <el-input v-model="info.deviceId"/>
                </kv>
                <kv label="金额(元)">
                    <el-input v-model="info.roundFee"/>
                </kv>
                <kv label="里程(米)">
                    <el-input v-model="info.distance"/>
                </kv>
                <kv label="高速出口">
                    <el-input v-model="info.exitStation"/>
                </kv>
                <kv label="出口时间">
                    <el-input v-model="info.exitTime"/>
                </kv>
            </div>
            <div style="text-align: center;">
                <el-button type="primary" size="large" @click="push_click()">推送</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: 'test',
        components: {},
        data() {
            return {
                mqVisible: false,
                info: {
                    vehicleId: "京A1234",
                    entryStation: "北京大兴区大红门",
                    entryTime: "2018-10-10 10:00:00",
                    deviceId: "1234",
                    roundFee: 1200,
                    distance: 1234,
                    exitStation: "北京昌平区回龙观",
                    exitTime: "2018-10-10 12:00:00",
                    recordId: ""
                }
            }
        },
        mounted() {

        },
        methods: {
            push_click() {
                this.$http.post("/test/push", this.info).then(res => {
                    jv.info("推送成功")
                    this.mqVisible = false;
                })
            }
        }
    }
</script>
